package com.wtx.fitness.exception;

import com.wtx.fitness.common.ResultCode;

/**
 * 资源未找到异常
 * 用于表示请求的资源不存在
 */
public class NotFoundException extends RuntimeException {

  private int code;

  public NotFoundException() {
    super(ResultCode.NOT_FOUND.getMessage());
    this.code = ResultCode.NOT_FOUND.getCode();
  }

  public NotFoundException(String message) {
    super(message);
    this.code = ResultCode.NOT_FOUND.getCode();
  }

  public int getCode() {
    return code;
  }
}